package com.example.eurekacustomer.service.fallback;

import com.example.eurekacustomer.service.FeignService;
import org.springframework.stereotype.Component;

import java.util.logging.Logger;

/**
 * @Auther: zyb
 * @Date: 2018/11/7 14:37
 * @Description: feign的Fallback的回调类
 */
@Component
public class FeignServiceFallback implements FeignService {

    private Logger logger = Logger.getLogger(FeignServiceFallback.class.toString());

    @Override
    public String index() {
        logger.info("index >>> 异常!");
        return "request index error";
    }

    @Override
    public String getUserName(String name) {
        logger.info("getUserName >>> 异常!");
        return "request getUserName error";
    }

    @Override
    public String getUserInfo(String name, String password) {

        logger.info("getUserInfo >>> 异常!");
        return "request getUserInfo error";
    }

    @Override
    public String putUserName(String name, String password) {
        logger.info("putUserName >>> 异常!");
        return "request putUserName error";
    }
}
